package com.test.reactor.control;

import com.alibaba.fastjson.JSONObject;

import reactor.core.publisher.Mono;

public abstract class AbstractController {
	
	/**
	 * 成功
	 * @return
	 */
	protected Mono<String> success(Object... data){
		JSONObject ret = new JSONObject();
		ret.put("status", 200);
		if (data.length > 0)
			ret.put("data", data);
		return Mono.just(ret.toString());
	}
}
